package our.pack;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;

public class MediaViewCameraActivity extends Activity {

	
	private ImageView image;
	private String PATH;
	private Bitmap bitmap;
	
	/**
	 * show a photo 
	 */
	
	public void onCreate(Bundle SaveInstanceState){
		super.onCreate(SaveInstanceState);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
		int height = getWindow().getAttributes().height;
		int width = getWindow().getAttributes().width;
		
		setContentView(R.layout.media_view_camera);
		
		//getting imagePATH
		Intent i = getIntent();
		Bundle b = i.getExtras();
		PATH = (String) b.get("PATH");
		
		//setting the image
		image = (ImageView) findViewById(R.id.mediaViewCameraImageView);
		image.setScaleType(ScaleType.FIT_XY);
		bitmap = BitmapFactory.decodeFile(PATH);
		image.setImageBitmap(bitmap);
		
	}
}
